package com.zl.project.service.Impl;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zl.project.dao.supplycomDao;
import com.zl.project.pojo.supplycom;
import com.zl.project.service.supplycomService;
@Service
public class supplycomServiceImpl implements supplycomService {

	@Autowired
	private supplycomDao sd;
	
	public Integer insertSupplycom(supplycom su) {
		SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		//su.setRegtime();
		String date=df.format(new Date());
		try {
			su.setRegtime(df.parse(date));
		} catch (ParseException e) {
			e.printStackTrace();
		}
		Integer judge = sd.insertSupplycom(su);
		return judge;
	}

}
